import axios from '@/api/fetch';
import SERVER from '@/api/server';

// 获取配件信息
export const getlist = params => axios.get(`${SERVER.CMSCLOUD_WMS}/apply/access`, { params });

// 新增配件地址
export const dosave = params => axios.post(`${SERVER.CMSCLOUD_WMS}/apply/access/dosave`,  params );

// 修改配件地址
export const doupdate = (id,params) => axios.post(`${SERVER.CMSCLOUD_WMS}/apply/access/doupdate/${id}`, params );

// 获取经销商收货地址
export const getDealerAddr = params => axios.get(`${SERVER.CMSCLOUD_WMS}/apply/access/getDealerAddr`, { params } );

// 获取已经提报的配件地址
export const getShlist = params => axios.get(`${SERVER.CMSCLOUD_WMS}/apply/access/shlist`, { params } );

// 配件地址维护的履历
export const getHistorylist = (id,params) => axios.get(`${SERVER.CMSCLOUD_WMS}/apply/access/gethistorylist/${id}`, params );

// 查询该经销商是否已经维护了常用地址
export const getdealer = params => axios.post(`${SERVER.CMSCLOUD_WMS}/apply/access/getdealer`,params);

